import request from '@/utils/request'

// 创建商品分类
export function createproductCategory(data) {
  return request({
    url: '/market/product-category/create',
    method: 'post',
    data: data
  })
}

// 更新商品分类
export function updateproductCategory(data) {
  return request({
    url: '/market/product-category/update',
    method: 'put',
    data: data
  })
}

// 删除商品分类
export function deleteproductCategory(id) {
  return request({
    url: '/market/product-category/delete?id=' + id,
    method: 'delete'
  })
}

// 获得商品分类
export function getproductCategory(id) {
  return request({
    url: '/market/product-category/get?id=' + id,
    method: 'get'
  })
}

// 获得商品分类列表
export function getproductCategoryList(params) {
  return request({
    url: '/market/product-category/list',
    method: 'get',
    params
  })
}
// 导出商品分类 Excel
export function exportproductCategoryExcel(params) {
  return request({
    url: '/market/product-category/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}